from sqlalchemy import Column, Integer, String

from .base import BaseModel


class FileInfoDo(BaseModel):
    __tablename__ = "file_info"
    __table_args__ = {"comment": "图片信息"}

    file_id = Column(Integer, primary_key=True, autoincrement=True, comment="图片ID")
    file_name = Column(String(255), comment="文件名")
    file_path = Column(String(255), comment="文件路径")
    file_size = Column(Integer, default=0, comment="文件大小(字节)")
    file_ext = Column(String(10), default="", comment="文件后缀(如jpg)")
    file_type = Column(Integer, comment="文件类型(如10=图片)")
    preview_url = Column(String(255), comment="预览URL")
    external_url = Column(String(255), comment="外部URL")
